﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Skyhook.Logic.VisualControllers;
using Microsoft.Xna.Framework;
using Skyhook.Core;
using Skyhook.Resources;

namespace Skyhook.Logic.Units
{
    class HugeObjects : ILogic
    {
        IObjectController ObjectController = null;
        public HugeObjects(string assetname, float startx, float starty)
        {
            IVisualObject visual = VisualsFactory.CreateHugeLeftPartVisual(assetname, 0);
            visual.ShowGroups(0);

            ObjectController = ObjectsEngine.CreateObject(this, visual);
            visual.SetScreenShift(new Vector2(2.0f, 0));

            ObjectController.Put(startx - 2.0f, starty);

            visual = VisualsFactory.CreateHugeRightPartVisual(assetname, 0);
            visual.ShowGroups(0);

            ObjectController = ObjectsEngine.CreateObject(this,visual);
            visual.SetScreenShift(new Vector2(0, 2.0f));

            ObjectController.Put(startx, starty - 2.0f);

            visual = VisualsFactory.CreatePartialVisual(assetname, 1, 2);
            visual.ShowGroups(0,1);

            ObjectController = ObjectsEngine.CreateObject(this, visual);

            ObjectController.Put(startx, starty);
        }

        public void Update(GameTime time)
        {
            
        }

        public float X
        {
            get
            {
                return ObjectController.X;
            }
        }
        public float Y
        {
            get
            {
                return ObjectController.Y;
            }
        }
    }
}
